package com.module.record.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.module.common.annotation.Excel;
import com.module.common.core.domain.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 设备上下线记录
 */
@Data
public class RecordOnlineVO implements Serializable {

    /** IMEI号 */
    @Excel(name = "IMEI号")
    private String deviceImei;

    /** 在线状态 */
    @Excel(name = "在线状态", readConverterExp = "online=上线,offline=离线")
    private String onlineStatus;

    /** 记录时间 */
    @Excel(name = "记录时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** 请求参数 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }
}
